home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-09-07 | 2.8 KB | 133 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "vSplit"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- 'This Object module will be compiled into part of the
- 'binary file that our test project will use to set
- 'properties for the objects on the form.
- '
- 'This Object module will control the Vertical Splitter
- Option Explicit
- 'These are the local variable(s)
- 'to hold property value(s)
- Private mHostPane As Object ' local copy
- Private mLeftPane As Object ' local copy
- Private mRightPane As Object ' local copy
- Private mSplitBar As Object ' local copy
- Private mSplitOn As Boolean ' local copy
-
- ' Here we set the "HostPane" as an object so that the
- ' dll can manipulate it's properties.
- ' Why do this? The answer is simple, When your app
- ' achives binary reuse, then you can change the dll
- ' without having to change the hardcode in the exe.
- ' this makes distributing "updates" simple and smaller
- ' in file size.
- Public Property Get HostPane() As Object
- '
- Set HostPane = mHostPane
- '
- End Property
-
- Public Property Set HostPane(ByVal vData As Object)
- '
- Set mHostPane = vData
- '
- End Property
-
- Public Property Get RightPane() As Object
- '
- Set RightPane = mRightPane
- '
- End Property
-
- Public Property Set RightPane(ByVal vData As Object)
- '
- Set mRightPane = vData
- '
- End Property
-
- Public Property Get LeftPane() As Object
- '
- Set LeftPane = mLeftPane
- '
- End Property
-
- Public Property Set LeftPane(ByVal vData As Object)
- '
- Set mLeftPane = vData
- '
- End Property
-
- Public Property Get SplitBar() As Object
- '
- Set SplitBar = mSplitBar
- '
- End Property
-
- Public Property Set SplitBar(ByVal vData As Object)
- '
- Set mSplitBar = vData
- '
- End Property
-
- Public Property Get SplitOn() As Boolean
- '
- SplitOn = mSplitOn
- '
- End Property
-
- Public Property Let SplitOn(ByVal vData As Boolean)
- '
- mSplitOn = vData
- '
- End Property
-
- Public Sub SetPointer(ByVal pType As Integer)
- '
- mHostPane.MousePointer = pType
- '
- End Sub
-
- Public Sub ResizePanes(Optional Twips As Single)
- '
- On Error GoTo localerr
- '
- If IsMissing(Twips) Then
- Twips = 0
- End If
- '
- With mSplitBar
- .Top = 0
- .Left = .Left + Twips
- .Height = mHostPane.ScaleHeight
- .Width = 30
- End With
- '
- With mLeftPane
- .Top = 0
- .Left = 0
- .Height = mHostPane.ScaleHeight
- .Width = mSplitBar.Left
- End With
- '
- With mRightPane
- .Top = 0
- .Left = mSplitBar.Left + mSplitBar.Width
- .Height = mHostPane.ScaleHeight
- .Width = mHostPane.ScaleWidth - _
- (mLeftPane.Width + mSplitBar.Width)
- End With
- '
- Exit Sub
- '
- localerr:
- 'ignore any errors
- End Sub
-
-